package com.zh.test.valide;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Author zhanghui
 * @Description //TODO 验证用controller
 * @Date 11:27 2021/4/13
 * @Param
 * @return
 */
@RestController("/validate")
public class validateController {
    Logger logger = LoggerFactory.getLogger(validateController.class);
    @PostMapping("/test1")
    public void test1(@Valid @RequestBody validBean bean ){
        logger.info(bean.toString());
    }
}
